package com.versita.shadow_sniper.domain;

import javax.persistence.Entity;

/**
 * 
 * @author vmc
 *
 */
@Entity
public class SniperRiffle extends Weapon {
    /**
     * 
     */
    private static final long serialVersionUID = 1234242345L;

    private String testing;

    public SniperRiffle() {}

    public SniperRiffle(String name, int range, double damage, double damageRadius, double weight) {
        this.setName(name);
        this.setRange(range);
        this.setDamage(damageRadius);
        this.setDamageRadius(damageRadius);
    }

    /**
     * @return the testing
     */
    public String getTesting() {
        return testing;
    }

    /**
     * @param testing the testing to set
     */
    public void setTesting(String testing) {
        this.testing = testing;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.testing == null) ? 0 : this.testing.hashCode());
        return result;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        SniperRiffle other = (SniperRiffle) obj;

        if (this.testing == null) {
            if (other.testing != null)
                return false;
        } else if (!this.testing.equals(other.testing))
            return false;
        return true;
    }
}
